/**
 * 
 */
package com.yidu.drug.service;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import com.yidu.drug.model.FdPurchaseModel;

/**
 * @author yuanwei
 *
 */
public interface FdPurchaseService {
	/**
	 * 查询所有
	 * @param page
	 * @param limit
	 * @return
	 */
	public List<FdPurchaseModel> findAll(FdPurchaseModel fdPurchaseModel,int page,int limit);
	
	/**
	 * 分页查询
	 * @param fdPurchaseModel
	 * @return
	 */
	Integer findRows(FdPurchaseModel fdPurchaseModel);
	
	/**
	 * 删除
	 * @param 
	 * @return
	 */
	public int delete(String fdPoId);
	
	/**
	 * 根据id查询数据
	 * @param fdPoId
	 * @return
	 */
	public FdPurchaseModel findById(String fdPoId);
	
	/**
	 * 根据id修改数据
	 * @param fdPoId
	 * @return
	 */
	public int update(FdPurchaseModel fdPurchaseModel);
	
	/**
	 * 新增订单
	 * @param fdPurchaseModel
	 * @return
	 */
	public int save(FdPurchaseModel fdPurchaseModel);
	
	/**
	 *  根据id修改价格和数量
	 * @param fdSunnum
	 * @param fdSumprice
	 * @param fdPoId
	 * @return
	 */
	public int updates(Long fdSunnum,BigDecimal fdSumprice,String fdPoId);

	public List<FdPurchaseModel> findAllPage(Map<String, String> map);
	public List<FdPurchaseModel> findAllPagess(Map<String, String> map);
	/**
     * 分页查询和条件查询
     * @param paramMap
     * @return
     */
	List<FdPurchaseModel> findAllPages(Map<String,String> paramMap);
	/**
	 * 分页
	 * @param fdPurchaseModel
	 * @return
	 */
	int findTotalRows(Map<String, String> map);
	
	/**
     * 采购订单审核分页查询和条件查询
     * @param paramMap
     * @return
     */
	List<FdPurchaseModel> findAllshenhe(Map<String,String> paramMap);
	/**
	 * 采购订单审核分页
	 * @param fdPurchaseModel
	 * @return
	 */
	int findAllshenheRows(Map<String, String> map);
	
	 /**
     * 修改分店状态
     * @param fdPoId
     * @return
     */
    int updateFdPoState(String fdPoId,String fdPoState);
    //根据id修改订单
    int updateByPrimaryKeySelective(FdPurchaseModel record);

    int updateByPrimaryKey(FdPurchaseModel record);

	public Object findRowss(FdPurchaseModel fdPurchase);

	public FdPurchaseModel findByfdPoId(String fdPoId);

	public List<FdPurchaseModel> findZdCwAll(Map<String, String> map);

	public Object findZdCwRow(FdPurchaseModel fdPurchase);
	/**
	 * 采购显示所有--退货
	 * @param map
	 * @return
	 */
	public List<FdPurchaseModel> findAlls(Map<String, String> map);
	/**
	 * 采购显示所有--退货
	 * @param map
	 * @return
	 */
	public Object findRows(Map<String, String> map);
	/**
	 * 根据采购Id修改审核状态(重新审核)
	 * @param pfId
	 * @return
	 */
	int updateByFdPoId(String fdPoId);
	
}
